////////////////////////////////////////////////////////////////////////////////
// Copyright 2006 CORE Solutions Limited
// All rights reserved.
// PROPRIETARY AND CONFIDENTIAL INFORMATION.
// Use is subject to license terms.
//
// FUNCTION ID      :   CCY_EXCHANGE
// AUTHOR           :   Ric Yik 
// DATE CREATE      :   2006/01/11
// DESCRIPTION      :   CodeMasterOptionsTag
//                  :   
//                  :   
//                  :   
//
// MODIFICATION HISTORY:
// DATE         AUTHOR          VERSION NO.         COMMENT
// -----------  --------------  ------------------  -------------------
// 2006/01/11   Ric Yik         1.0                 source is created.
//
//
//
////////////////////////////////////////////////////////////////////////////////

package com.erp.app.util.web.taglib;

import com.erp.app.common.ProjectConstants;

public class CodeMasterOptionsTag extends ProjectCustomOptionsTag {

    private String companyCode;

    private String referenceMasterCode;

    public CodeMasterOptionsTag() {
        this.setTable("T_CODE_DTL");
        this.setValuecolumn("REF_CODE");
        this.setTextcolumn("REF_CODE");
        this.setOrder("REF_DESC");
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getReferenceMasterCode() {
        return referenceMasterCode;
    }

    public void setReferenceMasterCode(String referencemasterCode) {
        this.referenceMasterCode = referencemasterCode;
    }

    /**
     * @see com.erp.app.util.web.taglib.ProjectCustomOptionsTag#makeWhereClause()
     */
    protected String makeWhereClause() {
        return "COMPANY_CODE = '" + this.getCompanyCode() 
                + "' AND REF_MASTER_CODE = '" + this.getReferenceMasterCode() 
                + "' AND REF_STATUS = '" + ProjectConstants.GENERIC_ACTIVE + "'";
    }

}
